<!--继承模板-->
{% extends 'layout.html' %}

<!--重写模块-->
{% block main%}
<ol class="breadcrumb">
    <li><a href="/admin">管理首页</a></li>
    <li><span>分类首页</span></a></li>
</ol>
<h3>博客分类</h3>
<!--包含模板-->
{% include 'page2.html' %}
<!---->
<table class="table table-hover table-bordered table-striped">
    <tr>
        <th>_ID</th>
        <th>分类名称</th>
        <th>操作</th>
    </tr>
    {% for categoy in categories %}
    <tr>
        <td>{{categoy._id.toString()}}</td>
        <td>{{categoy.name}}</td>
        <td>
            <a href="/admin/category/edit?id={{categoy._id.toString()}}">修改</a>  |
            <a href="/admin/category/delete?id={{categoy._id.toString()}}">删去</a>
        </td>
    </tr>
    {% endfor %}
</table>
<!--包含模板-->
{% include 'page2.html' %}
<!---->
{% endblock %}